package com.wuhainan.beelzebub.repository.system;

import com.wuhainan.beelzebub.common.BaseRepository;
import com.wuhainan.beelzebub.entity.system.Menu;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;
import org.springframework.stereotype.Repository;

/**
 * <br>Created by 吴海南 on 2017/12/29.
 * <br>星期五 at 16:35.
 */
@Repository
public interface MenuRepository extends BaseRepository<Menu,String> {
    @Query("select max(m.sort) from Menu m where parent_id= :parentId")
    Integer maxSort(@Param("parentId") String parentId);
}
